﻿using System;

namespace LayeredArchitectureSample.ViewModel
{
    public class ErrorViewModel
    {
        public ErrorViewModel(string errorMessage, string technicalDetails, string title)
        {
            if (errorMessage == null) throw new ArgumentNullException("errorMessage");
            if (title == null) throw new ArgumentNullException("title");

            ErrorMessage = errorMessage;
            TechnicalDetails = technicalDetails;
            Title = title;
        }

        public string ErrorMessage { get; private set; }
        public string TechnicalDetails { get; private set; }
        public string Title { get; private set; }

        public bool GotDetails
        {
            get { return TechnicalDetails != null; }
        }
    }
}